{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas_datareader as pdr\n",
    "alibaba = pdr.get_data_yahoo('BABA')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Open</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>Adj Close</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2014-09-19</th>\n",
       "      <td>99.699997</td>\n",
       "      <td>89.949997</td>\n",
       "      <td>92.699997</td>\n",
       "      <td>93.889999</td>\n",
       "      <td>271879400</td>\n",
       "      <td>93.889999</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-09-22</th>\n",
       "      <td>92.949997</td>\n",
       "      <td>89.500000</td>\n",
       "      <td>92.699997</td>\n",
       "      <td>89.889999</td>\n",
       "      <td>66657800</td>\n",
       "      <td>89.889999</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-09-23</th>\n",
       "      <td>90.480003</td>\n",
       "      <td>86.620003</td>\n",
       "      <td>88.940002</td>\n",
       "      <td>87.169998</td>\n",
       "      <td>39009800</td>\n",
       "      <td>87.169998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-09-24</th>\n",
       "      <td>90.570000</td>\n",
       "      <td>87.220001</td>\n",
       "      <td>88.470001</td>\n",
       "      <td>90.570000</td>\n",
       "      <td>32088000</td>\n",
       "      <td>90.570000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014-09-25</th>\n",
       "      <td>91.500000</td>\n",
       "      <td>88.500000</td>\n",
       "      <td>91.089996</td>\n",
       "      <td>88.919998</td>\n",
       "      <td>28598000</td>\n",
       "      <td>88.919998</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 High        Low       Open      Close     Volume  Adj Close\n",
       "Date                                                                        \n",
       "2014-09-19  99.699997  89.949997  92.699997  93.889999  271879400  93.889999\n",
       "2014-09-22  92.949997  89.500000  92.699997  89.889999   66657800  89.889999\n",
       "2014-09-23  90.480003  86.620003  88.940002  87.169998   39009800  87.169998\n",
       "2014-09-24  90.570000  87.220001  88.470001  90.570000   32088000  90.570000\n",
       "2014-09-25  91.500000  88.500000  91.089996  88.919998   28598000  88.919998"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alibaba.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1084, 6)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alibaba.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Open</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>Adj Close</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-01-03</th>\n",
       "      <td>134.869995</td>\n",
       "      <td>129.830002</td>\n",
       "      <td>134.270004</td>\n",
       "      <td>130.600006</td>\n",
       "      <td>19531300</td>\n",
       "      <td>130.600006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-04</th>\n",
       "      <td>141.080002</td>\n",
       "      <td>133.660004</td>\n",
       "      <td>134.259995</td>\n",
       "      <td>139.750000</td>\n",
       "      <td>22845400</td>\n",
       "      <td>139.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-07</th>\n",
       "      <td>144.080002</td>\n",
       "      <td>139.009995</td>\n",
       "      <td>140.550003</td>\n",
       "      <td>143.100006</td>\n",
       "      <td>17239000</td>\n",
       "      <td>143.100006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-08</th>\n",
       "      <td>147.550003</td>\n",
       "      <td>142.059998</td>\n",
       "      <td>145.000000</td>\n",
       "      <td>146.789993</td>\n",
       "      <td>16478200</td>\n",
       "      <td>146.789993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-09</th>\n",
       "      <td>152.300003</td>\n",
       "      <td>148.699997</td>\n",
       "      <td>149.889999</td>\n",
       "      <td>151.899994</td>\n",
       "      <td>3919342</td>\n",
       "      <td>151.899994</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  High         Low        Open       Close    Volume  \\\n",
       "Date                                                                   \n",
       "2019-01-03  134.869995  129.830002  134.270004  130.600006  19531300   \n",
       "2019-01-04  141.080002  133.660004  134.259995  139.750000  22845400   \n",
       "2019-01-07  144.080002  139.009995  140.550003  143.100006  17239000   \n",
       "2019-01-08  147.550003  142.059998  145.000000  146.789993  16478200   \n",
       "2019-01-09  152.300003  148.699997  149.889999  151.899994   3919342   \n",
       "\n",
       "             Adj Close  \n",
       "Date                    \n",
       "2019-01-03  130.600006  \n",
       "2019-01-04  139.750000  \n",
       "2019-01-07  143.100006  \n",
       "2019-01-08  146.789993  \n",
       "2019-01-09  151.899994  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alibaba.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Open</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>Adj Close</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1084.000000</td>\n",
       "      <td>1084.000000</td>\n",
       "      <td>1084.000000</td>\n",
       "      <td>1084.000000</td>\n",
       "      <td>1.084000e+03</td>\n",
       "      <td>1084.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>121.229821</td>\n",
       "      <td>118.197473</td>\n",
       "      <td>119.844260</td>\n",
       "      <td>119.710018</td>\n",
       "      <td>1.774704e+07</td>\n",
       "      <td>119.710018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>43.920796</td>\n",
       "      <td>42.840271</td>\n",
       "      <td>43.482727</td>\n",
       "      <td>43.381346</td>\n",
       "      <td>1.309897e+07</td>\n",
       "      <td>43.381346</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>58.650002</td>\n",
       "      <td>57.200001</td>\n",
       "      <td>57.299999</td>\n",
       "      <td>57.389999</td>\n",
       "      <td>3.775300e+06</td>\n",
       "      <td>57.389999</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>84.379999</td>\n",
       "      <td>82.347500</td>\n",
       "      <td>83.252497</td>\n",
       "      <td>83.275000</td>\n",
       "      <td>1.106465e+07</td>\n",
       "      <td>83.275000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>104.224998</td>\n",
       "      <td>102.182499</td>\n",
       "      <td>103.174999</td>\n",
       "      <td>103.205002</td>\n",
       "      <td>1.490490e+07</td>\n",
       "      <td>103.205002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>167.092503</td>\n",
       "      <td>163.320251</td>\n",
       "      <td>165.299999</td>\n",
       "      <td>164.234997</td>\n",
       "      <td>2.064880e+07</td>\n",
       "      <td>164.234997</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>211.699997</td>\n",
       "      <td>207.509995</td>\n",
       "      <td>209.949997</td>\n",
       "      <td>210.860001</td>\n",
       "      <td>2.718794e+08</td>\n",
       "      <td>210.860001</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              High          Low         Open        Close        Volume  \\\n",
       "count  1084.000000  1084.000000  1084.000000  1084.000000  1.084000e+03   \n",
       "mean    121.229821   118.197473   119.844260   119.710018  1.774704e+07   \n",
       "std      43.920796    42.840271    43.482727    43.381346  1.309897e+07   \n",
       "min      58.650002    57.200001    57.299999    57.389999  3.775300e+06   \n",
       "25%      84.379999    82.347500    83.252497    83.275000  1.106465e+07   \n",
       "50%     104.224998   102.182499   103.174999   103.205002  1.490490e+07   \n",
       "75%     167.092503   163.320251   165.299999   164.234997  2.064880e+07   \n",
       "max     211.699997   207.509995   209.949997   210.860001  2.718794e+08   \n",
       "\n",
       "         Adj Close  \n",
       "count  1084.000000  \n",
       "mean    119.710018  \n",
       "std      43.381346  \n",
       "min      57.389999  \n",
       "25%      83.275000  \n",
       "50%     103.205002  \n",
       "75%     164.234997  \n",
       "max     210.860001  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alibaba.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "DatetimeIndex: 1084 entries, 2014-09-19 to 2019-01-09\n",
      "Data columns (total 6 columns):\n",
      "High         1084 non-null float64\n",
      "Low          1084 non-null float64\n",
      "Open         1084 non-null float64\n",
      "Close        1084 non-null float64\n",
      "Volume       1084 non-null int64\n",
      "Adj Close    1084 non-null float64\n",
      "dtypes: float64(5), int64(1)\n",
      "memory usage: 59.3 KB\n"
     ]
    }
   ],
   "source": [
    "alibaba.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
